import React, { memo } from 'react'
import {withRouter} from 'react-router-dom'

import './style.css'



function Navs(props) {
  const { navs } = props

  

  return (
    <div className="navs">
      {
          navs.map((item, index) => {
            return (
              <div className="nav-item" key={item.title} onClick={() => props.history.push(item.path)}>
                <img src={item.img_src} alt="" />
                <div className="title">{item.title}</div>
              </div>
            )
          })
        }
    </div>
  )
}

export default memo(withRouter(Navs))
